<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<isperp:grid gridId="projectGrid" url="project/project/onFileList"
	datatype="local" showSearchbar="false"
	cusEditUrl="project/project/projectOnFileEdit" cusDialogSize="big"
	ondbClickRowEvent="projectGrid.edit(rowid);">

	<jsp:attribute name="toolbar">
	<isperp:treeMenu id="projectOnFileMenu" targetGridId="projectGrid">
		<isperp:async enable="true" url="project/project/onFileMenu"></isperp:async>
		<isperp:callback onClick="projectOnFileMenuTree_onNodeClick"
				onAsyncSuccess="projectOnFileMenuTree_onNodeClickFirst();">
		</isperp:callback>
	</isperp:treeMenu>
	</jsp:attribute>
	<jsp:body> 
	<isperp:column name="id" title="id" hidden="true"></isperp:column>
	<%-- <isperp:column name="projectLevel" title="" width="28"
			isFormatterFun="true" formatter="return statusFormatter(cellvalue);">
	</isperp:column> --%>
	<isperp:column name="code" title="项目编号" width="100">
	</isperp:column>
	<isperp:column name="name" title="项目名称" width="160">
	</isperp:column>
	<isperp:column name="account" title="项目金额(元)" width="80">
	</isperp:column>

	<isperp:column name="status" title="状态" width="60">
	</isperp:column>

	<isperp:column name="startDate" title="开始时间" width="80">
	</isperp:column>
	<isperp:column name="endDate" title="结束时间" width="80">
	</isperp:column>
		</jsp:body>
</isperp:grid>

<isperp:operate code="PROJ_ON_FILE"></isperp:operate>

<script type="text/javascript">
	function statusFormatter(cellvalue) {
		if (cellvalue == 'A级')
			return "<img title='A级项目' src='img/project/pa.png'>";
		else if (cellvalue == 'B级')
			return "<img title='B级项目' src='img/project/pb.png'>";
		else if (cellvalue == 'C级')
			return "<img title='C级项目' src='img/project/pc.png'>";
		else if (cellvalue == 'D级')
			return "<img title='D级项目' src='img/project/pd.png'>";
		else if (cellvalue == 'E级')
			return "<img title='E级项目' src='img/project/pe.png'>";
	}
</script>

